/*-----------------------------------------------
 * BookEZ - Booking System Project
 *-----------------------------------------------*/
package bookez.view.bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;

import bookez.model.service.UserService;


@ManagedBean
@SessionScoped
public class UserBean extends BaseBean {
	
	// ErrorsID
	public static final String USER_NOT_EXITS = "bookez.view.bean.UserBean.USER_NOT_EXISTS";
	public static final String PASSWORD_INCORRECT = "bookez.view.bean.UserBean.PASSWORD_INCORRECT";
	
	public static final String USERNAME_REQUIRED = "bookez.view.bean.UserBean.USERNAME_REQUIRED";
	public static final String PASSWORD_REQUIRED = "bookez.view.bean.UserBean.PASSWORD_REQUIRED";

	public UserBean() {
	}//end default constructor
	
	public String getUsername() { return username; }
	public void setUsername( String value ) { this.username = value; }
	
	public String getPassword() { return password; }
	public void setPassword( String value ) { this.password = value; }
	
	public boolean isAuthenticated() { return this.isAuthencitated; }
	public void setAuthenticated( boolean value ) { this.isAuthencitated = value; }
	
	public UserService getService() { return this.userService; }
	public void setService( UserService value ) { this.userService = value; }
	
	// Instance variables
	private String username;
	private String password;	
	private boolean isAuthencitated;
	
	@ManagedProperty ( name = "service", value = "#{userService}")
	private UserService userService;
	
	private static final long serialVersionUID = 977666470674173400L;	
}//end class UserBean
